package com.liu.controller;

import com.liu.mapper1.Book1Mapper;
import com.liu.mapper2.Book2Mapper;
import com.liu.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BookController {
    @Autowired
    Book1Mapper bookMapper1;
    @Autowired
    Book2Mapper bookMapper2;
    @GetMapping("/test1")
    public void test1(){
        List<Book> books1=bookMapper1.getAllBooks();
        List<Book> books2 = bookMapper2.getAllBooks();
        System.out.println("book1: "+books1);
        System.out.println("book2: "+books2);
    }

}
